package com.my.fp.streams;

import java.util.List;
import java.util.stream.IntStream;
import java.util.stream.Stream;

/**
 * @description:
 * @author: marshal
 * @date: 2021-08-24 2:06 PM
 */
public class IntStreamTest {
    public static void main(String[] args) {
        // 2-> 6
//        IntStream.rangeClosed(2, 6).forEach(System.out::println);
        // 0 -> 4
//        IntStream.range(0,5).forEach(System.out::println);
//        System.out.println(  IntStream.range(0, 10).sum());
        Integer reduce = Stream.of(1, 2, 3).reduce(0, Integer::sum);
    }
}
